package model

import (

	"github.com/doujunyu/gogo/gogo_log"
	"github.com/doujunyu/gogo/sql_aid"
)

const TableByVersion = "self_version"


//强制更新
const VersionByMustNo = 0 //否
const VersionByMustYes = 1 //是

// VersionByOutsetList 返回版本内容，从最新版到强制更新的版本内容
func VersionByOutsetList()map[string]interface{}{
	versionSql,args := sql_aid.PgTable(TableByVersion).OrderBy("v_one desc").OrderBy("v_two desc").OrderBy("v_three desc").ToSql()
	versionData,err := sql_aid.DataToMap(PgSql.Query(versionSql,args...))
	if err != nil || len(versionData) == 0{
		gogo_log.Error("model_VersionByOutsetList","sql错误",err.Error())
		return nil
	}
	return versionData[0]
}

